The Model Manager
Note: Segmentation using Deep Learning requires the Deep Learning extension to the 2D Automated Analysis module. The Image-Pro Neural Engine must be installed. Installing the Image-Pro Neural Engine
The Model Manger is a tool with which you can curate your collection of models.
The Model Manager can be accessed by selecting Manage Models from the AI drop down menu on the Count/Size Tab.
The Model Manager contains a table, with each model being represented by a row.
The following information is shown for each model:
Examples | Model | Description | History | |||
---|---|---|---|---|---|---|
This column shows example images with segmented objects found by the model. Mouse over examples to see an enlarged image. |
|
A description of the types of object the model was trained to find | If you trained the model, this column shows the number of images and labels with which the model was trained. The text ‘pre-trained’ is shown for default models. |
Select a model in the table to activate the actions buttons at the top of the Model Manager.
The action buttons that are activated when you select a model are different for locked, system locked and unlocked models.
Filtering
You can apply filters to show fewer models in the Model Manager.
Select from the Category drop down menu to only show models of the selected category.
You can choose to show only:
-
Recent
Show only recently used models in the model manager.
-
Favorites
Show only favorite models in the model manager.
Note: You add models to this category by clicking their favorite star in the model manager.
-
All
Show all models.
-
Pretrained AI Models
Only show the default Pro-AI Models.
-
My Models
Show only those models that you have added and trained
Select from this drop down menu to show only models from a single architecture.
You can choose from:
-
Base UNET
Image Segmentation using UNET Models
-
Cellpose
Finding Objects with Cellpose Models
-
StarDist
Select from the this drop down menu to show only those models appropriate for a single industry type.
You can chose from
-
All
-
General Use
-
Materials Science
-
Life Science
By entering a word, or part of a word in the Search field, the models shown are filtered based on the search term.
Actions
The Active Actions buttons vary depending on whether you have a model selected in the Model Manager, and the type of model selected.
Click New to add new untrained models to Image-Pro.
The New Model Dialog opens.
The dialog is divided into a series of steps.
-
Select Segmentation Method
Choose between Semantic and Instance segmentation.
Instance segmentation models attempt to identify each example or 'instance' of your objects of interest.
Semantic segmentation models assign class labels to each pixel within an image.
-
Choose Image Details
-
Select the Monochrome option if your images are gray scale (this option includes composite monochrome images).
-
Select the Color option if your images are 24, 32 or 48 bit color images (with R,G,B channels).
-
-
Configure Classes
-
Set the number of classes option if you have selected an architecture that supports multiple classes.
-
Set the option to define unlabeled pixels as either Background or Undefined.
-
-
Click on the color picker for each of your classes to define the appearance of objects within the class.
-
Note: If you set undefined pixels as background, you must assign all pixels that are part of a class of interest to the class. Failure to correctly label significant pixels will degrade your model. If you set unlabeled objected as undefined, they are assigned to a class that is ignored for both training and prediction.
-
Select the Architecture
Choose the architecture of the model that you wish to create. The choices available at this step is dependent in the selections that you make during previous steps.
-
Adjust Training Set Options
-
Select the Use Defaults option to apply the recommended settings. De-select Use Defaults to apply your own settings. The available settings depends upon the model architecture selected in step 4.
-
Rescale by Object Size. With this option selected you can enter the expected diameter of objects of interest. Training images will be rescaled to make the mean training object size match this diameter.
-
Tile Size. Set the size of tiles into which training images are divided for training.
-
Overlap. Set the degree of overlap between the edges of tiles.
-
-
-
Define Name and Description
-
Set the Name of the new model.
-
Make a selection from the Industry drop down menu. You can filter by Industry when opening models.
-
Enter a Description for the new model.
-
Add example images that illustrate the type of objects that the model is trained to find. Click on the ... button to browse for images, click Snap to add the currently active image as an example.
-
Add an optional Demo Image. Click on the ... button to browse for images.
-
Note: Example images can be added from the prediction panel after the model has been trained.
Click OK. The Model loads directly in the Deep Learning Training if the Load in Training option is selected.
Image-Pro is capable of importing models in the formats shown in the table below.
Imported models can be used for prediction, can be cloned, edited and be extended by further training in exactly the same way as native Image-Pro models.
Format | File Extension | Source |
---|---|---|
Image-Pro | DLX | Models trained by other users of Image-Pro |
Cellpose | No file extension | Cellpose Model Zoo |
Keras |
HDF5 or HD5 |
Other online Deep Learning Resources |
Click Import to add trained model files from compatible external sources.
-
A Load File dialog opens
-
Navigate to and select your model file
-
Click Open
-
The Edit Model dialog opens
-
Set the model name and description and click OK
-
The newly imported model is shown in the Model Manager and is available for AI Deep Learning Prediction or the AI Deep Learning Training.
You can Export deep learning model files and share them with other users of Image-Pro.
-
Select a model.
-
Click Export.
-
The Save Deep Learning Model Package dialog opens.
-
Navigate to an appropriate file location, name the package and click Save.
Note: Deep Learning Model Package files are saved with the .dlx extension.
Editing a model allows you to make a range of changes to a model. These range from trivial changes, such as changing the name of the model, to radical changes such as selecting a different segmentation method, a different architecture or changing tile size.
A warning dialog will be displayed when your changes require that a new untrained model is created. When making radical changes such as changing model architecture cloning the model, and making edits on the cloned model is recommended.
Select a model and click the Edit button. The Edit Model Dialog Opens.
The Edit Model Dialog is divided into a series of steps.
-
Select Segmentation Method
Choose between Semantic and Instance segmentation.
Instance segmentation models attempt to identify each example or 'instance' of your objects of interest.
Semantic segmentation models assign class labels to each pixel within a image.
-
Choose Image Details
-
Select the Monochrome option if your images are gray scale (this option includes composite monochrome images).
-
Select the Color option if your images are 24, 32 or 48 bit color images (with R,G,B channels).
-
-
Configure Classes
-
Set the number of classes option if you have selected an architecture that supports multiple classes.
-
Set the option to define unlabeled pixels as either Background or Undefined.
-
-
Click on the color picker for each of your classes to define the appearance of objects within the class.
-
-
Select the Architecture
Choose the architecture of the model. The choices available at this step is dependent in the selections that you make during previous steps.
-
Adjust Training Set Options
-
Select the Use Defaults option to apply the recommended settings. De-select Use Defaults to apply your own settings. The available settings depends upon the model architecture selected in step 4.
-
Rescale by Object Size. With this option selected you can enter the expected diameter of objects of interest. Training images will be rescaled to make the mean training object size match this diameter.
-
Tile Size. Set the size of tiles into which training images are divided for training.
-
Overlap. Set the degree of overlap between the edges of tiles.
-
-
-
Define Name and Description
-
Set the Name of the model.
-
Make a selection from the Industry drop down menu. You can filter by Industry when opening models.
-
Enter a Description for the model.
-
Add example images that illustrate the type of objects that the model is trained to find. Click on the ... button to browse for images, click Snap to add the currently active image as an example.
-
Add an optional Demo Image. Click on the ... button to browse for images.
-
Note: If your edits are not compatible with the model, a dialog with the text 'New Parameters are inconsistent with the existing trained model file or source images already added to the training. Click OK to keep the changes and reset the trained model file'. Clicking OK will generate a new, untrained model file while keeping the training images.
Select a Model and click Delete to remove a model. Deleted models are moved to the recycle bin.
Locked models can not be deleted.
All models, including Image-Pro AI models can be cloned. Cloned models must be given a new name. Cloned models can be both edited and extended through additional training.
Select a model and click Clone. The Clone Model Dialog Opens.
The Clone Model Dialog is divided into a series of steps.
The settings in steps 1 to 4 can not be adjusted during cloning. Edit the model after cloning to make changes to these settings.
-
Select Segmentation Method
This step is not configurable when cloning. Edit the cloned model to make changes here.
-
Choose Image Details
This step is not configurable when cloning. Edit the cloned model to make changes here.
-
Configure Classes
This step is not configurable when cloning. Edit the cloned model to make changes here.
-
Select the Architecture
This step is not configurable when cloning. Edit the cloned model to make changes here.
-
Adjust Training Set Options
-
Copy Training Sources. Select this option to copy the training images and their labels from the original model to the cloned model. This option allows you to re-use the training data from the original model and will ensure that the model remains effective against the original (pre-cloning) objects of interest. If you do not select this option, the cloned model is likely to become specialized towards your new training dataset and less effective against the old (pre-cloning) training dataset.
Note: This option is not displayed when cloning System Locked models.
-
Copy Training Model. Select this option to copy the trained model from the original model to the new model. This option allows you to make an exact duplicate of the exiting model. Deselecting this option generates an untrained model.
-
- Define Name and Description
-
Set the Name of the model.
-
Make a selection from the Industry drop down menu. You can filter by Industry when opening models.
-
Enter a Description for the model.
-
Add example images that illustrate the type of objects that the model is trained to find. Click on the ... button to browse for images, click Snap to add the currently active image as an example.
-
Add an optional Demo Image. Click on the ... button to browse for images.
-
Click OK. The Model loads directly in the Deep Learning Training if the Load in Trainer option is selected.
Select an unlocked model and click Lock to preserve the model in its current state. Locked models can not be changed through further training or be deleted.
Select a locked model and click Unlock to make the model changeable through further training and deletion.
System Locked models can not be unlocked. If you wish to change System Locked models you must Clone them first.
Select a model and click History to open the history dialog.
Click Show Sources to open the folder of training images in the File Browser.
The history dialog includes a table, each row of which represents a restore point.
Each row includes data for each restore points (RP) :
Date/Time | Images | Labels | Epochs | Loss | Restore | Delete |
---|---|---|---|---|---|---|
The time of RP creation | The number of training images. | The number of training labels. | Number of training epochs applied. | The Loss function for the RP | Click this button to revert the model to this RP. | Click this button to remove the RP from the history. |
Restore: Click this button (which is located in the table) to revert the model to its state when the restore point was created. The current state of the model is automatically added to the history as a new restore point.
Delete: Click this button (which is located in the table) to delete a restore point.
Reset Model: This option resets the model to a fully untrained state. A restore point of the current state is automatically added if this options is selected.
Create: This option adds a restore point of the model's current state.
Auto-Create Restore Points: With option selected, restore points are added to the history every time the Train button is clicked. With this option deselected, you can manually add restore points by clicking Create.
A second table Ancestors, displayed details of models from which the model was cloned.
Select a model and click Train to open a model in the AI Deep Learning Trainer.
Select a model and click Predict to open the model in the AI Deep Learning Prediction panel.